package org.example.B_100;

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

/**
 * 最长公共后缀
 */
public class LongestCommonSuffix {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        String line = sc.nextLine();

        String[] strings = Arrays.
                stream(line.substring(1,line.length()-1).split(","))
                .toArray(String[]::new);

        System.out.println(getResult(strings));

    }

    public static String getResult(String[] strings){
        return null;
    }

}
